import { InjectionToken } from "tsyringe";
import { IHttpGet, IHttpPost } from "../core/http";
import { tryGet } from "../utils/tryGet";

export const HTTP_GET: InjectionToken<IHttpGet> = `HTTP_GET`
export const HTTP_POST: InjectionToken<IHttpPost> = `HTTP_POST`

export interface IRemoveScript{
    name: string;
    code: string;
}
export const REMOTE_SCRIPT: InjectionToken<IRemoveScript> = `REMOTE_SCRIPT`

export function getRemoveScript() {
    return tryGet(REMOTE_SCRIPT)
}

export function getHttpGet() {
    return tryGet(HTTP_GET)
}

export function getHttpPost() {
    return tryGet(HTTP_POST)
}
